﻿using System;
using System.Collections.Generic;
using System.Text;

namespace designmodule.behavioralmodule.Interpreter
{
    class program
    {
        void main()
        {
            //为每一个文法定义一个类进行解析
            var context = new Context();
            var list = new List<AbstractExpression>();
            list.Add(new TerminalExpression());
            list.Add(new NonterminalExpression());
            list.Add(new TerminalExpression());
            list.Add(new TerminalExpression());

            foreach (var abstractExpression in list)
            {
                abstractExpression.Interpret(context);
            }
        }
    }
}
